{extend name="public:base" /}

{block name="body"}
<div class="main" style="padding:15px;">
    <div class="content">
        <span style="margin-left: 0">分类管理</span>
        <button class="layui-btn layui-btn-xs" onclick="catadd()">添加</button>
        <div></div>
    </div>
    <table class="layui-table">
        <thead>
        <tr>
            <th style="text-align: center;font-weight: bold">ID</th>
            <th style="text-align: center;font-weight: bold">分类名称</th>
            <th style="text-align: center;font-weight: bold">状态</th>
            <th style="text-align: center;font-weight: bold">操作</th>
        </tr>
        </thead>
        <tbody>
        {volist name="right" id='right'}
        <tr>
            <td style="text-align: center">{$right.id}</td>
            <td style="text-align: center">{$right.name}</td>
            <td style="text-align: center">{eq name="$right.status" value="1"}
                <span style="color: #00FF00">开启</span>
                {else/}<span style="color:red">关闭{/eq}</span></td>
            <td>
                <button class="layui-btn layui-btn-xs" onclick="catedit({$right.id})">编辑</button>
                <button class="layui-btn layui-btn-danger layui-btn-xs" onclick="catdel({$right.id})">删除</button>
            </td>
        </tr>
        {/volist}
        </tbody>
    </table>

</div>



{/block}